-- GENERATED SPELL FOR [Harbinger of Horror] --


function spell0_32278(pUnit, Event) --@Chill Nova,Self--
pUnit:FullCastSpellOnTarget(18099,pUnit)
pUnit:RegisterEvent('Sorts_32278', 10335, 1)
end

function spell1_32278(pUnit, Event) --@Fear,n/a--
pUnit:FullCastSpellOnTarget(12096,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32278', 9500, 1)
end

function spell2_32278(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(18100,pUnit)
pUnit:RegisterEvent('Sorts_32278', 0, 1)
end

function spell3_32278(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(61747,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32278', 6000, 1)
end

function spell4_32278(pUnit, Event) --@Lich Slap,n/a--
pUnit:FullCastSpellOnTarget(60924,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32278', 564, 1)
end

function Sorts_32278(pUnit, Event)
local choix_sorts_32278 = math.random(0, 4)
if choix_sorts_32278 == 0 then
pUnit:RegisterEvent('spell0_32278', 1, 1)
end
if choix_sorts_32278 == 1 then
pUnit:RegisterEvent('spell1_32278', 1, 1)
end
if choix_sorts_32278 == 2 then
pUnit:RegisterEvent('spell2_32278', 1, 1)
end
if choix_sorts_32278 == 3 then
pUnit:RegisterEvent('spell3_32278', 1, 1)
end
if choix_sorts_32278 == 4 then
pUnit:RegisterEvent('spell4_32278', 1, 1)
end
end

function mob32278_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32278', math.random(1500, 3000), 1)
end

function mob32278_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32278_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32278_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32278, 1, 'mob32278_Action')
RegisterUnitEvent(32278, 2, 'mob32278_Leave')
RegisterUnitEvent(32278, 3, 'mob32278_Kill')
RegisterUnitEvent(32278, 4, 'mob32278_Die')
